from django.core.mail import send_mail
from django.conf import settings
from main import celery_app


@celery_app.task()
def send_mail_celery(title, content, to_mail):
    print('发送邮件任务')
    res = send_mail(title, content, settings.EMAIL_FROM, [to_mail])
    return res
